package pattern12;

/**
 * 具体的状态，每一个子类实现一个与Context状态相关的行为
 * @author wdl
 */
public class ConcreteStateA implements IState {

    @Override
    public void doAction(Context context) {
        System.out.println("this is ConcreteStateA");
        //设置ConcreteStateA的下一个状态是ConcreteStateB
        context.setState(new ConcreteStateB());
    }
}
